package ex.inte;

import java.text.ParseException;
import java.time.*;
import java.time.temporal.ChronoUnit;
import java.time.temporal.TemporalAmount;
import java.util.Random;

public class TimeTest {
    public static void main(String[] args) throws ParseException {
        TemporalAmount amount = Duration.ofSeconds(100);
        TemporalAmount period = Period.ofDays(5);
        MyLocalDateTime myLocalDateTime = MyLocalDateTime.of(2023,5,5);
        System.out.println(myLocalDateTime);
        myLocalDateTime=myLocalDateTime.minus(amount);
        System.out.println(myLocalDateTime);
        myLocalDateTime=myLocalDateTime.minus(period);
        System.out.println(myLocalDateTime);

        System.out.println("--------------------------------------------");
        myLocalDateTime = myLocalDateTime.minusSecond(8566641);
        System.out.println(myLocalDateTime);


    }
}
